package com.szqhyxj.youxiangju.biz.policy;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import io.reactivex.Observable;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/10/30.
 */

public class PolicyModel {

    public interface PolicyService {
        @POST("user/insurance/getinsurance")
        Observable<BaseResult<PolicyEntity>> policy();
    }

    public static Observable<BaseResult<PolicyEntity>> getPolicy() {
        return RetrofitFacade.Companion.getRetrofit().create(PolicyService.class).policy();
    }

    public class PolicyEntity{
        private int insuranceAmount;
        private String endDate;
        private int documentType;
        private String guaranteeAmount;
        private int insuranceType;
        private int userId;
        private String insuranceBatch;
        private String addDate;
        private String insurant;
        private int inId;
        private String insurancePerson;
        private String identNumber;
        private String insuranceNo;
        private String insuranceTerm;
        private String useraccount;
        private String effectiveDate;

        public void setInsuranceAmount(int insuranceAmount){
            this.insuranceAmount = insuranceAmount;
        }

        public int getInsuranceAmount(){
            return insuranceAmount;
        }

        public void setEndDate(String endDate){
            this.endDate = endDate;
        }

        public String getEndDate(){
            return endDate;
        }

        public void setDocumentType(int documentType){
            this.documentType = documentType;
        }

        public int getDocumentType(){
            return documentType;
        }

        public void setGuaranteeAmount(String guaranteeAmount){
            this.guaranteeAmount = guaranteeAmount;
        }

        public String getGuaranteeAmount(){
            return guaranteeAmount;
        }

        public void setInsuranceType(int insuranceType){
            this.insuranceType = insuranceType;
        }

        public int getInsuranceType(){
            return insuranceType;
        }

        public void setUserId(int userId){
            this.userId = userId;
        }

        public int getUserId(){
            return userId;
        }

        public void setInsuranceBatch(String insuranceBatch){
            this.insuranceBatch = insuranceBatch;
        }

        public String getInsuranceBatch(){
            return insuranceBatch;
        }

        public void setAddDate(String addDate){
            this.addDate = addDate;
        }

        public String getAddDate(){
            return addDate;
        }

        public void setInsurant(String insurant){
            this.insurant = insurant;
        }

        public String getInsurant(){
            return insurant;
        }

        public void setInId(int inId){
            this.inId = inId;
        }

        public int getInId(){
            return inId;
        }

        public void setInsurancePerson(String insurancePerson){
            this.insurancePerson = insurancePerson;
        }

        public String getInsurancePerson(){
            return insurancePerson;
        }

        public void setIdentNumber(String identNumber){
            this.identNumber = identNumber;
        }

        public String getIdentNumber(){
            return identNumber;
        }

        public void setInsuranceNo(String insuranceNo){
            this.insuranceNo = insuranceNo;
        }

        public String getInsuranceNo(){
            return insuranceNo;
        }

        public void setInsuranceTerm(String insuranceTerm){
            this.insuranceTerm = insuranceTerm;
        }

        public String getInsuranceTerm(){
            return insuranceTerm;
        }

        public void setUseraccount(String useraccount){
            this.useraccount = useraccount;
        }

        public String getUseraccount(){
            return useraccount;
        }

        public void setEffectiveDate(String effectiveDate){
            this.effectiveDate = effectiveDate;
        }

        public String getEffectiveDate(){
            return effectiveDate;
        }

        @Override
        public String toString(){
            return
                    "PolicyEntity{" +
                            "insuranceAmount = '" + insuranceAmount + '\'' +
                            ",endDate = '" + endDate + '\'' +
                            ",documentType = '" + documentType + '\'' +
                            ",guaranteeAmount = '" + guaranteeAmount + '\'' +
                            ",insuranceType = '" + insuranceType + '\'' +
                            ",userId = '" + userId + '\'' +
                            ",insuranceBatch = '" + insuranceBatch + '\'' +
                            ",addDate = '" + addDate + '\'' +
                            ",insurant = '" + insurant + '\'' +
                            ",inId = '" + inId + '\'' +
                            ",insurancePerson = '" + insurancePerson + '\'' +
                            ",identNumber = '" + identNumber + '\'' +
                            ",insuranceNo = '" + insuranceNo + '\'' +
                            ",insuranceTerm = '" + insuranceTerm + '\'' +
                            ",useraccount = '" + useraccount + '\'' +
                            ",effectiveDate = '" + effectiveDate + '\'' +
                            "}";
        }
    }

}
